package com.lgqz.topsports.bean;

import android.content.Context;
import android.content.Intent;
import android.databinding.ObservableInt;

import com.google.gson.annotations.Expose;
import com.lgqz.topsports.activity.TopSportsActivity;

import java.util.List;

/**
 * Description:tops和contents共用的实体类
 * Copyright(c) 2016,邱国兴
 * This Program is protected by copyright laws
 * Created by Little Monster on 2016/12/15.
 *
 * @author 邱国兴
 */
public class Content {
    private long id;
    private long user_id;
    private long dashboard_id;
    private int dashboard_type;
    private long dashboard_data;
    private String title;
    private String text;
    private String image;

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    private List<String> images;
    @Expose(serialize = false, deserialize = false)
    private ObservableInt colorFlag = new ObservableInt(0);

    public ObservableInt getColorFlag() {
        return colorFlag;
    }

    public void setColorFlag(int colorFlag) {
        this.colorFlag.set(colorFlag);
    }

    private int image_type;
    private int content_type;
    private int video_type;

    public int getVideo_type() {
        return video_type;
    }

    public void setVideo_type(int video_type) {
        this.video_type = video_type;
    }

    private int status;
    private int show_type;
    private int label;
    private String label_name;
    private String create_time;
    private String editor;
    private String update_time;
    private int note_num;
    private User user;
    private List<Channel> channels;
    private String source_link;
    private int cbs_flag;
    private boolean expire_flag;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getUser_id() {
        return user_id;
    }

    public void setUser_id(long user_id) {
        this.user_id = user_id;
    }

    public long getDashboard_id() {
        return dashboard_id;
    }

    public void setDashboard_id(long dashboard_id) {
        this.dashboard_id = dashboard_id;
    }

    public int getDashboard_type() {
        return dashboard_type;
    }

    public void setDashboard_type(int dashboard_type) {
        this.dashboard_type = dashboard_type;
    }

    public long getDashboard_data() {
        return dashboard_data;
    }

    public void setDashboard_data(long dashboard_data) {
        this.dashboard_data = dashboard_data;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public int getImage_type() {
        return image_type;
    }

    public void setImage_type(int image_type) {
        this.image_type = image_type;
    }

    public int getContent_type() {
        return content_type;
    }

    public void setContent_type(int content_type) {
        this.content_type = content_type;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getShow_type() {
        return show_type;
    }

    public void setShow_type(int show_type) {
        this.show_type = show_type;
    }

    public int getLabel() {
        return label;
    }

    public void setLabel(int label) {
        this.label = label;
    }

    public String getLabel_name() {
        return label_name;
    }

    public void setLabel_name(String label_name) {
        this.label_name = label_name;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getEditor() {
        return editor;
    }

    public void setEditor(String editor) {
        this.editor = editor;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public int getNote_num() {
        return note_num;
    }

    public void setNote_num(int note_num) {
        this.note_num = note_num;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Channel> getChannels() {
        return channels;
    }

    public void setChannels(List<Channel> channels) {
        this.channels = channels;
    }

    public String getSource_link() {
        return source_link;
    }

    public void setSource_link(String source_link) {
        this.source_link = source_link;
    }

    public int getCbs_flag() {
        return cbs_flag;
    }

    public void setCbs_flag(int cbs_flag) {
        this.cbs_flag = cbs_flag;
    }

    public boolean isExpire_flag() {
        return expire_flag;
    }

    public void setExpire_flag(boolean expire_flag) {
        this.expire_flag = expire_flag;
    }

    public void click(Context context) {
        Intent intent = new Intent(context, TopSportsActivity.class);
        intent.putExtra("id", id);
        intent.putExtra("dashboard_id", dashboard_id);
        setColorFlag(1);
        context.startActivity(intent);
    }
}
